﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Experimental8.Infrastructure;
using Experimental8.Modules.CommonDictionaries;
using Microsoft.Practices.Prism.MefExtensions.Modularity;
using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.Prism.Regions;


namespace Experimental8.Modules.CommonDictionaries
{
    [ModuleExport(typeof(CommonDictionariesModule))]
    public class CommonDictionariesModule : IModule
    {
        private readonly IRegionManager _regionManager;
       
        
        [ImportingConstructor]
        public CommonDictionariesModule(IRegionManager regionManager)
        {
            this._regionManager = regionManager;
           
        }

        public void Initialize()
        {
            Debug.Print("Initialize method in CommonDictionariesModule");
            this._regionManager.RegisterViewWithRegion(RegionNames.MainTabRegion, typeof(ContractorsView));
            this._regionManager.RegisterViewWithRegion(RegionNames.MainTabRegion, typeof(ContractorGroupsView));
        }

        
    }
}
